<script type="text/javascript">
$.loginForm = {
  submit: function() {
    $('#password').val($.sha1($('#password').val()));
    return true;
  }
}
</script>

<section class="ui-amp-container">
  <header><h2><?php echo __('Login') ?></h2></header>
  
  <?php echo $this->AmpForm->form(array('onsubmit'=>'return $.loginForm.submit();'),
    $this->AmpForm->text('username', __('Username').':'),
    $this->AmpForm->password('password', __('Password').':', array('input'=>array('id'=>'password'))),
    $this->AmpForm->submit(__('Ok'))
  ) ?>
</section>